1. Field of the Invention
The present invention relates to a message control apparatus, and in particular to a message control apparatus for transferring messages between objects which belong to different processes.
In a system using the object-oriented technique, communications between objects which belong to the different processes are performed by transferring messages such as request messages between the processes. Each of the processes is required to perform at least the change of the order for transferring the messages and the adjustment of a load for transferring the messages.
2. Description of the Related Art
FIG. 20 shows an arrangement (1) of a conventional message control apparatus 100. This message control apparatus 100 forms a process together with a message receiver 200 which receives a request message (hereinafter occasionally abbreviated as a request) 700 and target objects TO_1-TO_3 which are the destinations of the request 700.
The message control apparatus 100 is composed of a message distributor 300 connected to the message receiver 200 and queue buffers 431-433 respectively corresponding to the target objects TO_1-TO_3. Threads 500_1-500_3 (occasionally represented as 500) are respectively given to the target objects TO_1-TO_3 from the queue buffers 431-433.
In operation, {circle around (1)} the message receiver 200 sends the received request 700 to the message distributor 300; {circle around (2)} the message distributor 300 distributes the request 700 as sequentially received in the form of requests R1, R2, R3, and R9, requests R4 and R5, and requests R6, R7, and R8 to the queue buffers 431-433 corresponding to the target objects TO_1-TO_3 which are the destinations of the requests; {circle around (3)} the target objects TO_1-TO_3 respectively perform a polling to the queue buffers 431-433 at predetermined time intervals, and if there are buffered requests, a single thread is prepared to take out the requests one by one for the processing.
Namely, each of the target objects TO_1-TO_3 always takes out the request 700 to which the FIFO (first-in first-out) method is applied at the queue buffers 431-433 regardless of the importance and the priority of the request 700 to process the same.
Accordingly, when the requests R1, R2, and R3 are received from a process of the first transmitting source and the request R9 is from a process of the second transmitting source and when the priority of the second process is higher than that of the first process, the target object TO_1 cannot process the request R9 until the requests R1, R2, and R3 are done.
Also, even if the request R3 is so important as required to be more quickly processed than the requests R1 and R2, the request R3 is not processed until the requests R1 and R2 are sequentially processed, so that a standby time becomes long.
FIG. 21 shows an arrangement (2) of the conventional message control apparatus 100 which solves the above-mentioned problem. This arrangement is different from the above-mentioned arrangement (1) in that there is no queue buffers like the buffers 431-433, and the message distributor 300 gives a plurality of threads 500_1-500_3 and 500_4-500_6 to the target objects TO_1 and TO_2, respectively.
In operation, {circle around (1)} the message receiver 200 sends the received request 700 to the message distributor 300; {circle around (2)} the message distributor 300 prepares the threads 500_1-500_3 respectively for requests Get1, Set1, and Get2 which form the request 700 between the request 700 and the destination, i.e. the target object TO_1. At the target object TO_1, a Get processor 610 simultaneously processes the requests Get1 and Get2, while a Set processor 620 processes the request Set1.
Similarly, the message distributor 300 prepares the threads 500_4-500_6 respectively for requests 701-703 towards the target object TO_2, which simultaneously processes the requests 701-703.
Accordingly, in the message control apparatus 100, there is no standby time in the presence of the prior art queue buffer of FIG. 20.
However, since the thread 500 should be prepared for all of the request 700, it is disadvantageous that the number of threads simultaneously prepared increases with the overhead in the process increased so that the process speed of the whole system is delayed.